\(\int \frac {x^2 (A+B x)}{(a+b x^2)^{3/2}} \, dx\) [30]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 20, antiderivative size = 66 \[ \int \frac {x^2 (A+B x)}{\left (a+b x^2\right )^{3/2}} \, dx=-\frac {x (A+B x)}{b \sqrt {a+b x^2}}+\frac {2 B \sqrt {a+b x^2}}{b^2}+\frac {A \text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{b^{3/2}} \]

[Out]

A*arctanh(x*b^(1/2)/(b*x^2+a)^(1/2))/b^(3/2)-x*(B*x+A)/b/(b*x^2+a)^(1/2)+2*B*(b*x^2+a)^(1/2)/b^2

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {833, 655, 223, 212} \[ \int \frac {x^2 (A+B x)}{\left (a+b x^2\right )^{3/2}} \, dx=\frac {A \text {arctanh}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{b^{3/2}}-\frac {x (A+B x)}{b \sqrt {a+b x^2}}+\frac {2 B \sqrt {a+b x^2}}{b^2} \]

[In]

Int[(x^2*(A + B*x))/(a + b*x^2)^(3/2),x]

[Out]

-((x*(A + B*x))/(b*Sqrt[a + b*x^2])) + (2*B*Sqrt[a + b*x^2])/b^2 + (A*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]])/b^
(3/2)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 655

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[e*((a + c*x^2)^(p + 1)/(2*c*(p + 1))),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rule 833

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(d + e*x)^(m
 - 1)*(a + c*x^2)^(p + 1)*((a*(e*f + d*g) - (c*d*f - a*e*g)*x)/(2*a*c*(p + 1))), x] - Dist[1/(2*a*c*(p + 1)),
Int[(d + e*x)^(m - 2)*(a + c*x^2)^(p + 1)*Simp[a*e*(e*f*(m - 1) + d*g*m) - c*d^2*f*(2*p + 3) + e*(a*e*g*m - c*
d*f*(m + 2*p + 2))*x, x], x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && LtQ[p, -1] && GtQ
[m, 1] && (EqQ[d, 0] || (EqQ[m, 2] && EqQ[p, -3] && RationalQ[a, c, d, e, f, g]) ||  !ILtQ[m + 2*p + 3, 0])

Rubi steps \begin{align*} \text {integral}& = -\frac {x (A+B x)}{b \sqrt {a+b x^2}}+\frac {\int \frac {a A+2 a B x}{\sqrt {a+b x^2}} \, dx}{a b} \\ & = -\frac {x (A+B x)}{b \sqrt {a+b x^2}}+\frac {2 B \sqrt {a+b x^2}}{b^2}+\frac {A \int \frac {1}{\sqrt {a+b x^2}} \, dx}{b} \\ & = -\frac {x (A+B x)}{b \sqrt {a+b x^2}}+\frac {2 B \sqrt {a+b x^2}}{b^2}+\frac {A \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {x}{\sqrt {a+b x^2}}\right )}{b} \\ & = -\frac {x (A+B x)}{b \sqrt {a+b x^2}}+\frac {2 B \sqrt {a+b x^2}}{b^2}+\frac {A \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{b^{3/2}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.27 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.05 \[ \int \frac {x^2 (A+B x)}{\left (a+b x^2\right )^{3/2}} \, dx=\frac {2 a B-A b x+b B x^2}{b^2 \sqrt {a+b x^2}}+\frac {2 A \text {arctanh}\left (\frac {\sqrt {b} x}{-\sqrt {a}+\sqrt {a+b x^2}}\right )}{b^{3/2}} \]

[In]

Integrate[(x^2*(A + B*x))/(a + b*x^2)^(3/2),x]

[Out]

(2*a*B - A*b*x + b*B*x^2)/(b^2*Sqrt[a + b*x^2]) + (2*A*ArcTanh[(Sqrt[b]*x)/(-Sqrt[a] + Sqrt[a + b*x^2])])/b^(3
/2)

Maple [A] (verified)

Time = 3.53 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.03

method result size
risch \(\frac {B \sqrt {b \,x^{2}+a}}{b^{2}}-\frac {A x}{b \sqrt {b \,x^{2}+a}}+\frac {A \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{b^{\frac {3}{2}}}+\frac {a B}{b^{2} \sqrt {b \,x^{2}+a}}\) \(68\)
default \(B \left (\frac {x^{2}}{\sqrt {b \,x^{2}+a}\, b}+\frac {2 a}{b^{2} \sqrt {b \,x^{2}+a}}\right )+A \left (-\frac {x}{b \sqrt {b \,x^{2}+a}}+\frac {\ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{b^{\frac {3}{2}}}\right )\) \(74\)

[In]

int(x^2*(B*x+A)/(b*x^2+a)^(3/2),x,method=_RETURNVERBOSE)

[Out]

B*(b*x^2+a)^(1/2)/b^2-1/b*A*x/(b*x^2+a)^(1/2)+1/b^(3/2)*A*ln(x*b^(1/2)+(b*x^2+a)^(1/2))+a/b^2*B/(b*x^2+a)^(1/2
)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 164, normalized size of antiderivative = 2.48 \[ \int \frac {x^2 (A+B x)}{\left (a+b x^2\right )^{3/2}} \, dx=\left [\frac {{\left (A b x^{2} + A a\right )} \sqrt {b} \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) + 2 \, {\left (B b x^{2} - A b x + 2 \, B a\right )} \sqrt {b x^{2} + a}}{2 \, {\left (b^{3} x^{2} + a b^{2}\right )}}, -\frac {{\left (A b x^{2} + A a\right )} \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - {\left (B b x^{2} - A b x + 2 \, B a\right )} \sqrt {b x^{2} + a}}{b^{3} x^{2} + a b^{2}}\right ] \]

[In]

integrate(x^2*(B*x+A)/(b*x^2+a)^(3/2),x, algorithm="fricas")

[Out]

[1/2*((A*b*x^2 + A*a)*sqrt(b)*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) + 2*(B*b*x^2 - A*b*x + 2*B*a)*sq
rt(b*x^2 + a))/(b^3*x^2 + a*b^2), -((A*b*x^2 + A*a)*sqrt(-b)*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - (B*b*x^2 - A
*b*x + 2*B*a)*sqrt(b*x^2 + a))/(b^3*x^2 + a*b^2)]

Sympy [A] (verification not implemented)

Time = 2.71 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.26 \[ \int \frac {x^2 (A+B x)}{\left (a+b x^2\right )^{3/2}} \, dx=A \left (\frac {\operatorname {asinh}{\left (\frac {\sqrt {b} x}{\sqrt {a}} \right )}}{b^{\frac {3}{2}}} - \frac {x}{\sqrt {a} b \sqrt {1 + \frac {b x^{2}}{a}}}\right ) + B \left (\begin {cases} \frac {2 a}{b^{2} \sqrt {a + b x^{2}}} + \frac {x^{2}}{b \sqrt {a + b x^{2}}} & \text {for}\: b \neq 0 \\\frac {x^{4}}{4 a^{\frac {3}{2}}} & \text {otherwise} \end {cases}\right ) \]

[In]

integrate(x**2*(B*x+A)/(b*x**2+a)**(3/2),x)

[Out]

A*(asinh(sqrt(b)*x/sqrt(a))/b**(3/2) - x/(sqrt(a)*b*sqrt(1 + b*x**2/a))) + B*Piecewise((2*a/(b**2*sqrt(a + b*x
**2)) + x**2/(b*sqrt(a + b*x**2)), Ne(b, 0)), (x**4/(4*a**(3/2)), True))

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.97 \[ \int \frac {x^2 (A+B x)}{\left (a+b x^2\right )^{3/2}} \, dx=\frac {B x^{2}}{\sqrt {b x^{2} + a} b} - \frac {A x}{\sqrt {b x^{2} + a} b} + \frac {A \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{b^{\frac {3}{2}}} + \frac {2 \, B a}{\sqrt {b x^{2} + a} b^{2}} \]

[In]

integrate(x^2*(B*x+A)/(b*x^2+a)^(3/2),x, algorithm="maxima")

[Out]

B*x^2/(sqrt(b*x^2 + a)*b) - A*x/(sqrt(b*x^2 + a)*b) + A*arcsinh(b*x/sqrt(a*b))/b^(3/2) + 2*B*a/(sqrt(b*x^2 + a
)*b^2)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.88 \[ \int \frac {x^2 (A+B x)}{\left (a+b x^2\right )^{3/2}} \, dx=\frac {{\left (\frac {B x}{b} - \frac {A}{b}\right )} x + \frac {2 \, B a}{b^{2}}}{\sqrt {b x^{2} + a}} - \frac {A \log \left ({\left | -\sqrt {b} x + \sqrt {b x^{2} + a} \right |}\right )}{b^{\frac {3}{2}}} \]

[In]

integrate(x^2*(B*x+A)/(b*x^2+a)^(3/2),x, algorithm="giac")

[Out]

((B*x/b - A/b)*x + 2*B*a/b^2)/sqrt(b*x^2 + a) - A*log(abs(-sqrt(b)*x + sqrt(b*x^2 + a)))/b^(3/2)

Mupad [B] (verification not implemented)

Time = 6.06 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.92 \[ \int \frac {x^2 (A+B x)}{\left (a+b x^2\right )^{3/2}} \, dx=\frac {A\,\ln \left (\sqrt {b}\,x+\sqrt {b\,x^2+a}\right )}{b^{3/2}}-\frac {A\,x}{b\,\sqrt {b\,x^2+a}}+\frac {B\,\left (b\,x^2+2\,a\right )}{b^2\,\sqrt {b\,x^2+a}} \]

[In]

int((x^2*(A + B*x))/(a + b*x^2)^(3/2),x)

[Out]

(A*log(b^(1/2)*x + (a + b*x^2)^(1/2)))/b^(3/2) - (A*x)/(b*(a + b*x^2)^(1/2)) + (B*(2*a + b*x^2))/(b^2*(a + b*x
^2)^(1/2))